﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace W5_DoAnCuoiKy_Glow.Content
{
    public partial class CAdminCty : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                string del = ("delete from CongTy");
                DataProvider.ExcuteQuery(del);
                string sql = String.Format("insert into CongTy values (N'{0}',null,null,'{1}',N'{2}','{3}',N'{4}')", txtTenCty.Text, txtEmail.Text, txtDiaChi.Text, txtDienThoai.Text, CKEditorControl1.Text);
                DataProvider.ExcuteQuery(sql);
                Alert.Show("Cập nhật thành công");
            }
            catch (Exception ex)
            {
                Alert.Show("Không thể cập nhật !");
            }
        }
    }
}
